/* Tables 4 and 5 */

clear all
do prelim.do

* pooledlogs

reg logref logPOPA i.CL L_GDP_PC_PPP Conflict_ORIGIN logPOPB i.CL_01 L_GDP_PC_PPP_01 Conflict_DESTINATION L_dist contig comlang_off colonizer /*
*/ i.Year  if Year>1989 & Year<2014, vce(cluster varpanel)
est store pooledlogs

* fixed effects logs

xtreg logref logPOPA i.CL L_GDP_PC_PPP Conflict_ORIGIN logPOPB i.CL_01 L_GDP_PC_PPP_01 Conflict_DESTINATION L_dist contig comlang_off colonizer /*
*/ i.Year if Year>1989 & Year<2014, fe vce(cluster varpanel)
est store fixedeffects

outreg2 [pooledlogs fixedeffects ] using table4, tex dec(4) replace

do prelim.do

* pooled poisson

poisson Refugees logPOPA i.CL L_GDP_PC_PPP Conflict_ORIGIN logPOPB i.CL_01 L_GDP_PC_PPP_01 Conflict_DESTINATION L_dist contig comlang_off colonizer /*
*/ i.Year if Year>1989 & Year<2014, vce(cluster varpanel) technique(nr dfp bfgs)
est store pooledpoisson

* psm-gmm

poisson Refugees logPOPA i.CL L_GDP_PC_PPP Conflict_ORIGIN logPOPB i.CL_01 L_GDP_PC_PPP_01 Conflict_DESTINATION L_dist contig comlang_off colonizer /*
*/ i.Year logpmo logpmd if Year>1989 & Year<2014, vce(cluster varpanel)
est store psmpoisson

outreg2 [pooledpoisson psmpoisson] using table5, tex dec(4) replace

